const { encryption } = require('../../../utils');

const encryptionMiddleware = async (ctx, next) => {
  const user = ctx.request.body;
  user.password = encryption(user.password);
  await next();
};

module.exports = encryptionMiddleware;
